package com.sxit.tdf.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 角色表
 *
 * @author 橙子高🍊
 * @since 2022-02-05
 */
@TableName("tb_role")
@Schema(name = "Role对象", description = "角色表")
public class Role implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键")
  @TableId(value = "id", type = IdType.AUTO)
  private Integer id;

  @Schema(description = "角色名称")
  private String roleName;

  @Schema(description = "权限集合")
  private String permissions;

  @Schema(description = "描述")
  private String roleDesc;

  @Schema(description = "系统角色内置权限")
  private String defaultPermissions;

  @Schema(description = "是否为系统内置角色")
  private Boolean systemic;

  @Schema(description = "创建角色时间")
  private LocalDateTime createTime;

  @Schema(description = "更新角色信息时间")
  private LocalDateTime updateTime;

  public String getRoleDesc() {
    return roleDesc;
  }

  public void setRoleDesc(String roleDesc) {
    this.roleDesc = roleDesc;
  }

  public LocalDateTime getCreateTime() {
    return createTime;
  }

  public void setCreateTime(LocalDateTime createTime) {
    this.createTime = createTime;
  }

  public LocalDateTime getUpdateTime() {
    return updateTime;
  }

  public void setUpdateTime(LocalDateTime updateTime) {
    this.updateTime = updateTime;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getRoleName() {
    return roleName;
  }

  public void setRoleName(String roleName) {
    this.roleName = roleName;
  }

  public String getPermissions() {
    return permissions;
  }

  public void setPermissions(String permissions) {
    this.permissions = permissions;
  }

  public String getDefaultPermissions() {
    return defaultPermissions;
  }

  public void setDefaultPermissions(String defaultPermissions) {
    this.defaultPermissions = defaultPermissions;
  }

  public Boolean getSystemic() {
    return systemic;
  }

  public void setSystemic(Boolean systemic) {
    this.systemic = systemic;
  }

  @Override
  public String toString() {
    return "Role{"
        + "id="
        + id
        + ", roleName="
        + roleName
        + ", permissions="
        + permissions
        + ", desc="
        + roleDesc
        + ", defaultPermissions="
        + defaultPermissions
        + ", systemic="
        + systemic
        + "}";
  }
}
